package database;

import auxilary.Configurations;

public final class Tables {
	public static final String SCHEMA = Configurations.DB.NAME;
	
	public static final class User {
		public static final String dbName = "user";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {
			public static final String ID = "id";
			public static final String USERNAME = "username";
			public static final String PASSWORD = "password";
			public static final String FIRST_NAME = "fName";
			public static final String LAST_NAME = "lName";
			public static final String EMAIL = "email";
			public static final String FACULTY = "faculty";
			public static final String SEMESTER = "semester";
			public static final String PHONE = "phone";
			public static final String IS_ADMIN = "isAdmin";
		}
	}

	public static final class Course {
		public static final String dbName = "course";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {

			public static final String ID = "id";
			public static final String NAME = "name";
			public static final String DESCRIPTION = "description";
			public static final String CREDITS = "credits";
			public static final String CAPACITY = "capacity";
			public static final String GROUP_ID = "groupId";
			public static final String IS_REMOVED = "isRemoved";
			public static final String CREATOR_ID = "creatorId";
		}
		public static final class Fk {
			public static final String CREATOR = "fk_creator";
		}
	}
	
	public static final class Session {
		public static final String dbName = "session";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {

			public static final String ID = "id";
			public static final String COURSE_ID = "courseId";
			public static final String START_SLOT = "startSlot";
			public static final String END_SLOT = "endSlot";
		}
		public static final class Fk {
			public static final String COURSE = "fk_course";
		}
	}
	
	public static final class Tags {
		public static final String dbName = "tag";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {

			public static final String ID = "id";
			public static final String NAME = "name";
			public static final String IS_REMOVED = "isRemoved";			
		}

	}
	
	public static final class CourseToTag {
		public static final String dbName = "course2tag";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {
			public static final String ID = "id";
			public static final String COURSE_ID = "courseId";
			public static final String TAG_ID = "tagId";
			public static final String IS_REMOVED = "isRemoved";
		}
		public static final class Fk {
			public static final String COURSE = "fk_course";
			public static final String TAG = "fk_tag";
		}
	}
	
	public static final class CourseToUser {
		public static final String ID = "id";
		public static final String dbName = "course2user";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {
			public static final String COURSE_ID = "courseId";
			public static final String USER_ID = "userId";
			public static final String IS_REGISTERED = "isRegistered";
		}
		public static final class Fk {
			public static final String COURSE = "fk_course";
			public static final String USER = "fk_user";
		}
	}
	
	public static final class Styles {
		public static final String dbName = "styles";
		public static final String fullDBName = "`" + SCHEMA +"`.`"+dbName+"`";

		public static final class Columns {
			public static final String ID = "id";
			public static final String NAME = "name";
			public static final String FILE = "file";
		}
	}

}
